package edu.njust.httpmanager.common;

import edu.njust.httpmanager.entity.User;

public class UserContext {

    private static final InheritableThreadLocal<User> userContext = new InheritableThreadLocal<>();

    public static User getUser() {
        return userContext.get();
    }

    public static void setUser(User user) {
        userContext.set(user);
    }

    public static void removeUser() {
        userContext.remove();
    }

}
